#ifndef DW_SYSTEM_PLUGINMANAGER_H
#	define DW_SYSTEM_PLUGINMANAGER_H

#include "base/singleton.h"

namespace dw {
	namespace system {

using dw::base::Singleton;

class IPlugin;

class PluginManager
	:	public dw::base::Singleton< PluginManager >
{
// Methods
public :
	IPlugin* LoadPlugin(const std::string&);
	bool FreePlugin(const std::string&);

protected : //! @name Construction & destruction
	//! @{
	PluginManager();
	~PluginManager();
	//! @}

protected : //! @name Friends
	//! @{
	friend class dw::base::Singleton< PluginManager >;
	//! @}


private : //! @name Types definitions
	//! @{
	typedef std::map<const std::string, IPlugin*> PluginMap;
	typedef PluginMap::iterator PluginIterator;
	//! @}

private ://! @name Data
	//! @{
	PluginMap _plugins;
	//! @}
};

	} // namespace system
} // namesapce dw

#endif // !DW_SYSTEM_PLUGINMANAGER_H
